#include <stdio.h>
#include <stdlib.h>
#include "semanteme.c"
#include "scan.c"

int main()
{

    FILE *fp = fopen("input.txt","r");
    strFileName = "output.txt";
    if(fp==NULL)
    {
        printf("FAIL");
        exit(1);
    }
    char input[255];
    fw = fopen(strFileName,"w");
    while(fscanf(fp,"%[^#]s",input))
    {
        printf("YOUR WORDS:\n%s\n\n",input);
        strSource = input;
        printf("Lexical analysis results:\n");
        //ApartWord(strSource);
        printf("\n");
        printf("Parser analysis results:\n");
        lrparse();
        printf("\n");
    }
    fclose(fw);
    return 0;
}
